home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / dinkum3 / monster.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  29.0 KB  |  860 lines

  1. #define MNSTR
  2. #include "dink_sym.h"
  3. #include "dink_glb.h"
  4.  
  5. int sw_snaked = FALSE, sw_wombat = FALSE ;
  6.  
  7. #if (PROTOTYPE)
  8. void monster(int loc_pnt[3])
  9. #else
  10. monster(loc_pnt)
  11. int loc_pnt[3] ;
  12. #endif
  13. /********************************************************************/
  14. /*                                                                  */
  15. /*                  --- The Monster Subroutine ---                  */
  16. /*                                                                  */
  17. /*  monster_flag is a global variable input parameters              */
  18. /*                                                                  */
  19. /* Software by Gary A. Allen, Jr. 24 January 1993,  Version: Mk 1.6 */
  20. /*           (c) Copyright 1993 by Gary A. Allen, Jr.               */
  21. /*                                                                  */
  22. /********************************************************************/
  23. {
  24. register int j ;
  25. int sw_chasing, sw_local ;
  26. static int sw_hoop = FALSE, bear_flag = 0 ;
  27. static int sw_replaced = FALSE ;
  28. static int sw_nogo = FALSE, sw_guarded = TRUE ;
  29. static int sw_letter = FALSE ;
  30. static int count_down = 0 ;
  31.  
  32. MONSTER_STRUCT *mnstr, *mnstr_local, *mnstr_chase ;
  33.  
  34. #if (PROTOTYPE)
  35. void ender(int), long_descp(int), hold_it(void), boom(void) ;
  36. void ned_kills(void), mullah_kills(void) ;
  37. void see_letter(int*, int*) ;
  38. void chief_mullah(int*) ;
  39. int bribe_mullah(int*) ;
  40. void chaser(MONSTER_STRUCT*, int[3]) ;
  41. #else
  42. int bribe_mullah() ;
  43. #endif
  44.  
  45. /* set up some of the input variables */
  46. sw_chasing = FALSE ; /* turn off the chasing monster switch */
  47. sw_local = FALSE ;   /* turn off the local monster switch */
  48.  
  49. /* There can be no active monsters while in the closet */
  50. if (loc_pnt[0] == R_closet) {
  51.     monster_flag = F_no_monster ;
  52.     if (sw_letter == TRUE) {
  53.         sw_letter = FALSE ;
  54.         sw_nogo = TRUE ;
  55. printf("\nYou hear a loud \"BOOM!\" from the Prayer Room followed\n");
  56. printf("by the sounds of people shouting and cursing in Farsi. I\n");
  57. printf("think it is definitely time that we leave.\n") ;
  58.     }
  59.     return ;
  60. }
  61.  
  62. /* scan the enemy table for the local and/or chasing monsters */
  63. for (j = 0; j <= Enemy_cnt; j++) {
  64.     mnstr = (monster_start + j) ;  /* point to the monster */
  65.     if (mnstr->Location == loc_pnt[0]) {
  66.         sw_local = TRUE;
  67.         mnstr_local = mnstr ;
  68.     }
  69.     else if (mnstr->Status != F_asleep){
  70.         if ((N_mullah == j)||(N_guards == j)||((N_ned == j)&&
  71.         (mnstr->Status == F_stealing))) continue ;
  72.         sw_chasing = TRUE;
  73.         mnstr_chase = mnstr ;
  74.     }
  75.  
  76. /* see if the monster is local */
  77. if (sw_local) {
  78. /* deal with case of being chased by monster to another monster */
  79. if (sw_chasing) {
  80.  
  81.     switch(mnstr_chase->Type) {
  82. /* Mutant wombat scares off the local monser */
  83.     case N_wombat:
  84. /* put the local monster to sleep and swap location with wombat  */
  85.     mnstr_local->Status = F_asleep ;
  86.     --room[mnstr_local->Location][M_monster] ;
  87.     mnstr_local->Location = Wombat->Location ;
  88.     ++room[Wombat->Location][M_monster] ;
  89.     chaser(mnstr_chase, loc_pnt) ;
  90.     return ;
  91.  
  92. /* Hoop Snake breaks off the chase */
  93.     case N_hoop_snake:
  94. printf("                     ---- What a relief!! ---- \n") ;
  95. printf("           The dreaded hoop snake has broken off pursuit.\n");
  96. printf("                         But what is this!!\n\n") ;
  97. printf("You see yet another terrible creature!\n");
  98.     sw_replaced = TRUE  ;
  99.     break ;
  100.     }
  101.  
  102.     /* put the chasing monster to sleep */
  103.     monster_flag = F_no_monster ;
  104.     mnstr_chase->Status = F_asleep ;
  105.     sw_chasing = FALSE;
  106. }
  107.  
  108. /* local monster routines */
  109. switch(mnstr_local->Type) {
  110.  
  111. /* Revolutionary Guard local (only) behavior */
  112. case N_guards:
  113. monster_flag = F_monster_active ;
  114.  
  115. /* guards always kill after the letter bomb has exploded */
  116. if (sw_nogo) {
  117. printf("\nWith you are three men dressed in ripped and shredded ");
  118. printf("clothes which have\nbeen blackened by an explosion.  They ") ;
  119. printf("are armed to the teeth and insane\nwith rage.  They take ");
  120. printf("one look at you and proceed to cut you to pieces with\n");
  121. printf("their automatic weapons!\n\n");
  122.     ender(F_died) ;
  123. }
  124.  
  125. /* guards always kill if they see a rifle */
  126. if (Rifle->Location == B_have) {
  127. printf("With you are four men dressed in rather shabby clothes. ");
  128. printf("Three of them\nare clutching AK-47 assault rifles while ");
  129. printf("the fourth one is holding an Uzi\nmachine gun. They ") ;
  130. printf("take one look at the M-16 rifle which you are clutching,\n");
  131. printf("point their own weapons at you and proceed to hose you ");
  132. printf("with a hail of\nlead!  Five seconds later you look like ");
  133. printf("a piece of Swiss cheese.\n\n") ;
  134.     ender(F_died) ;
  135. }
  136.  
  137. switch (Guards->Status) {
  138.     case F_asleep:
  139.         Guards->Status = F_passive ;
  140. printf("With you are four men dressed in rather shabby clothes. ");
  141. printf("Three of them\nare clutching AK-47 assault rifles while ");
  142. printf("the fourth one is holding an Uzi\nmachine gun. They ") ;
  143. printf("search you but find nothing that is obviously a\n") ;
  144. printf("weapon.  They are in a quandary on what to do with ") ;
  145. printf("you, since you\nliterally appeared out of thin air.\n");
  146.         return ;
  147.     
  148.     case F_passive:
  149.         if (Mullah->Status == F_asleep) {
  150. printf("\nThe four men have concluded that the best thing to do\n");
  151. printf("with you is to take you to their superiors.  Two of the men\n");
  152. printf("roughly grab hold of you and fling you bodily through the\n");
  153. printf("doorway to the east.\n\n") ;
  154.         loc_pnt[0] = R_prayer;
  155.         long_descp(R_prayer) ;
  156.         chief_mullah(&count_down) ;
  157.         return ;
  158.         }
  159.         if (sw_guarded) {
  160. printf("\nAll of the guards are currently in the prayer room.\n") ;
  161.             sw_guarded = FALSE ;
  162.         }
  163.         return ;
  164.  
  165.     case F_aggressive:
  166.         Guards->Status = F_killing ;
  167. printf("\nThe four guards grab you by the arms and legs, and frog\n");
  168. printf("march you back into the prayer room.\n");
  169.         loc_pnt[0] = R_prayer;
  170.         return ;
  171.  
  172.     case F_killing:
  173. printf("\nThe guards are tired of fooling with you.  One of them\n") ;
  174. printf("hits you on the head with the butt of his rifle.  Then the\n");
  175. printf("other two guards drag you outside where you are executed\n");
  176. printf("before a jeering mob of 30,000 people!\n\n") ;
  177.         ender(F_died) ;
  178.  
  179. } /* end of the Guards local routine and switch block */
  180.  
  181.  
  182. /* Chief Mullah local (only) behaivor */
  183. case N_mullah:
  184. switch (Mullah->Status) {
  185.     case F_asleep:
  186.         chief_mullah(&count_down) ;
  187.         return ;
  188.  
  189.     case F_aggressive:
  190.         /* The Mullah takes any valuables dropped */
  191.         if (bribe_mullah(&count_down)) return ;
  192.  
  193.         /* The Mullah sees and takes the letter */
  194.         if (Letter->Location == R_prayer) {
  195.             see_letter(&count_down, &sw_letter);
  196.             return ;
  197.         }
  198.         count_down++ ;
  199.         switch(count_down) {
  200.         case 1:
  201. printf("\nThe Mullah is waiting for you to give him something.\n") ;
  202.             return ;
  203.         case 2:
  204. printf("\nThe Mullah is becoming quite impatient.  You had better\n") ;
  205. printf("do something soon!\n") ;
  206.         Mullah->Status = F_killing ;
  207.         }
  208.         return ;
  209.  
  210.     case F_passive:
  211.         count_down++ ;
  212.         switch(count_down) {
  213.  
  214.         case 1:
  215. printf("\nThe Mullah is examining the envelope of Muammar's letter.\n");
  216.             return ;
  217.  
  218.         case 2:
  219. printf("\nThe Mullah has turned the envelope over and is just\n") ;
  220. printf("about to open it.\n") ;
  221.             return ;
  222.  
  223.         case 3:
  224.             boom() ;
  225. printf("The Mullah opened the letter.  Needless to say, the letter\n") ;
  226. printf("was a bomb.  The good news is the nasty old Mullah died.\n");
  227. printf("The bad news is you died in the explosion as well!\n\n") ;
  228.             ender(F_died) ;
  229.         }
  230.  
  231.     case F_killing:
  232.         if (bribe_mullah(&count_down)) {
  233.             Mullah->Status = F_aggressive ;
  234.             return ;
  235.         }
  236.         if (Letter->Location==R_prayer) {
  237.             see_letter(&count_down, &sw_letter);
  238.             return ;
  239.         }
  240. printf("\n\"You are a brainless idiot!\" screams the Mullah!\n") ;
  241.         mullah_kills() ;
  242. } /* end of mullah status switch block */
  243.  
  244. /* The mullah sees Gaddafi's letter (this might be dead code) */
  245. /* temporary */
  246. see_letter(&count_down, &sw_letter);
  247. return ;
  248. /* end of the mullah local behavior routine */
  249.  
  250. /* Ned Kelly local behavior */
  251. case N_ned:
  252. if (monster_flag == F_no_monster) {
  253. printf("\nAs you approached the entrance of Ned Kelly's hide out, a ") ;
  254. printf("man walked out\n") ;
  255. printf("the front door and prevented you from entering.  He is ");
  256. printf("wearing an iron\n") ;
  257. printf("helmet with thin eye slits which completely covers ");
  258. printf("his head.  He has\n") ;
  259. printf("body armour made of thin sheets of iron that covers ");
  260. printf("his chest and abdomen.\n") ;
  261. printf("He is holding a 12 guage double barrel shotgun ");
  262. printf("and has a pistol on\nhis hip.  ") ;
  263. printf("I could be wrong but I think this is Ned Kelly!\n\n");
  264.     loc_pnt[0] = R_hideout_entr ;
  265.     monster_flag = F_monster_active ;
  266.     Ned->Status = F_passive ;
  267.     return ;
  268. }
  269. else {
  270.     if (Ned->Status == F_killing) ned_kills() ;
  271. printf("\nNed is not about to allow you to enter his hide out.  He ");
  272. printf("is now expressing\n") ;
  273. printf("his displeasure with your continued presence by cocking both ");
  274. printf("of the hammers on\n") ;
  275. printf("his shotgun and pointing it at your head.  I believe it is ");
  276. printf("time to go!!\n\n") ;
  277.     loc_pnt[0] = R_hideout_entr ;
  278.     Ned->Status = F_killing ;
  279.     return ;
  280. }
  281.  
  282. /* Mutant Wombat monster behavior */
  283. case N_wombat:
  284. sw_replaced = FALSE ; 
  285. if (monster_flag == F_no_monster) {
  286. printf("\n                        ----- OH NO!! -----\n") ;
  287. printf("                  You are in ***SERIOUS TROUBLE*** !!!\n") ;
  288. printf("Forget about hoop snakes, and forget about drop bears.  This ");
  289. printf("is the WORST\n") ;
  290. printf("thing that can be found in the ACME Mine.  You see before ");
  291. printf("you the awful\n") ;
  292. printf("spawn of the Pommy nuclear weapon's tests. Its ancestors ");
  293. printf("were inoffensive\n") ;
  294. printf("creatures, but gamma radiation has transformed this into...\n");
  295. printf("                      The Dreadful Mutant Wombat!! \n") ;
  296. printf("Normally I would advise you to run for your life.  However ");
  297. printf("there's really\n");
  298. printf("no point.  You can not out run this thing, and it's almost ");
  299. printf("impossible to\n");
  300. printf("kill.  You might as well just stand here and let it finish ");
  301. printf("you off as\n") ;
  302. printf("quickly and painlessly as possible.\n\n") ;
  303.     monster_flag = F_monster_active ;
  304.     Wombat->Status = F_aggressive ;
  305.     loc_pnt[1] = loc_pnt[0] ; 
  306.     loc_pnt[2] = 0 ; /* zero out the previous location */
  307. }
  308. else {
  309.     if (Wombat->Status == F_aggressive) {
  310. printf("\nThe wombat is approaching you.  Its mouth is wide open ") ;
  311. printf("showing its\n") ;
  312. printf("enormous canines.  Its claws are fully extended.  The ") ;
  313. printf("wombat sees\n") ;
  314. printf("you as an easy meal and is preparing to feast.\n") ;
  315.         Wombat->Status = F_killing ;
  316.         return ;
  317.     }
  318.     if (Wombat->Status == F_killing) {
  319.         /* The Mutant Wombat kills the player */
  320. printf("\nThe obscene creature has grasped you with its terrible ");
  321. printf("claws!  First the\n");
  322. printf("wombat rips off your right arm with a single jerk and ");
  323. printf("tosses it down its\n");
  324. printf("throat like it was an appetizer (which it was!).  Next ");
  325. printf("the monster studies\n");
  326. printf("you for a moment and then twists off your left leg and ") ; 
  327. printf("chews on it like\n") ;
  328. printf("a turkey drumstick.  After savoring your left leg, it ");
  329. printf("opens its mouth wide\n");
  330. printf("and stuffs you in head first!  Your last memory was ") ;
  331. printf("hearing the crunching\n");
  332. printf("of your own bones as the wombat's jaws clamped down!\n") ;
  333.         ender(F_died) ;
  334.     }
  335. }
  336. return ;
  337.  
  338. /* Drop Bear monster behavior */
  339. case N_drop_bear:
  340. sw_replaced = FALSE ; 
  341. if (monster_flag == F_no_monster) {
  342.     switch(bear_flag) {
  343. case 0:
  344. printf("\nAs you walk in, you see something that looks vaguely like") ;
  345. printf(" a koala bear\n") ;
  346. printf("sitting in the middle of the floor.  However this \"koala\"") ;
  347. printf(" has vampire\n") ;
  348. printf("teeth and blood drooling down the sides of its mouth. The") ;
  349. printf(" bear takes\n") ;
  350. printf("one look at you and climbs up the wall onto the ceiling.") ;
  351. printf(" It \n") ;
  352. printf("clings to the ceiling much like a fly and seems to be") ;
  353. printf(" positioning\n") ;
  354. printf("itself to be directly over you.  I could be wrong but I") ;
  355. printf(" think this is\n") ;
  356. printf("the deadly DROP BEAR! \n\n") ;
  357.     bear_flag = 1 ;
  358.     break ;
  359.  
  360. case 1:
  361. printf("\nJust as you walk in, a drop bear flashes by and hits") ;
  362. printf(" the ground with\n");
  363. printf("a THUNK.  That was close!  Had it hit you, and caught ") ;
  364. printf("hold with its\n");
  365. printf("claws, you would have been finished.  The dreaded ");
  366. printf("beast is now\n") ;
  367. printf("running up the wall towards the ceiling to give it ") ;
  368. printf("another go. I\n");
  369. printf("think we had better leave and soon!\n\n") ;;
  370.     bear_flag = 2 ;
  371.     break ;
  372.  
  373. case 2:
  374. printf("\nAs you walk in, you see a drop bear lounging lazily in") ;
  375. printf(" the middle of\n");
  376. printf("the floor. It rolls over and takes one look at you, ") ;
  377. printf("runs towards\n");
  378. printf("the wall and scampers up to the ceiling.  It is now ");
  379. printf("positioning\n") ;
  380. printf("itself to be directly over you.\n\n") ;
  381.     bear_flag = 1 ;
  382.     }
  383.  
  384. monster_flag = F_monster_active ;
  385. mnstr_local->Status = F_aggressive ;
  386. }
  387. else {
  388.     if (mnstr_local->Status == F_aggressive) {
  389. printf("\nThe drop bear is now positioned directly above you.  It is") ;
  390. printf(" hanging batlike\n") ;
  391. printf("by its rear paws, with its front arms reaching out with");
  392. printf(" claws fully \n") ;
  393. printf("extended.  Its mouth is wide open with its vampire teeth ");
  394. printf("clearly visible.\n") ;
  395. printf("I think this thing means business!  Let's make a hasty ");
  396. printf("departure!!\n") ;
  397.         mnstr_local->Status = F_killing ;
  398.         return ;
  399.     }
  400.     if (mnstr_local->Status == F_killing) {
  401.         /* The drop bear kills the player */
  402. printf("\nThe drop bear drops on top of you!  First it grabs hold ") ;
  403. printf("of you with its \n") ;
  404. printf("sharp claws that sink deep into your flesh.  Then it bites ");
  405. printf("into your neck \n") ; 
  406. printf("at the jugular vein and begins sucking your blood.  You ");
  407. printf("try desperately \n") ;
  408. printf("to pull the horrible monster off, but it only clamps on ");
  409. printf("harder and sucks \n") ; 
  410. printf("more vigorously.  Soon you grow weak from lack of blood, ");
  411. printf("and lapse into death. \n") ;
  412.         ender(F_died) ;
  413.     }
  414. }
  415. return ;
  416.  
  417. /* Hoop Snake monster behavior */
  418. case N_hoop_snake:
  419. if (monster_flag == F_no_monster) {
  420.     if (sw_replaced) { 
  421.         sw_replaced = FALSE  ;
  422. printf("\nA new and rested hoop snake rolls into view.  The ");
  423. printf("snake sees you, lets go of\n") ;
  424. printf("its tail and starts slithering towards you with fangs ");
  425. printf("at the ready. \n\n");
  426.     }
  427.     else {
  428.         if (!sw_hoop) {
  429. printf("\nSomething that looks vaguely like a barrel hoop rolls into ");
  430. printf("the passage. You \n") ;
  431. printf("suddenly realize to your horror that this is no hoop but a ");
  432. printf("snake biting its \n") ;
  433. printf("own tail.  The snake lets go of its tail and starts to ");
  434. printf("slither towards you \n") ;
  435. printf("like a regular, highly aggressive snake. \n\n");
  436.             sw_hoop = TRUE ;
  437.         }
  438.         else {
  439. printf("\nA hoop snake rolls towards you.  It lets go of its ");
  440. printf("tail and starts slithering\n") ;
  441. printf("in your direction. \n\n");
  442.         }
  443.     }
  444.     monster_flag = F_monster_active ;
  445.     mnstr_local->Status = F_aggressive ;
  446.     loc_pnt[1] = loc_pnt[0] ; 
  447.     loc_pnt[2] = 0 ; /* zero out the previous location */
  448.     return ;
  449. }
  450. else {
  451.     if (mnstr_local->Status == F_aggressive) {
  452. printf("\nThe hoop snake is coiling up in front of you and ") ;
  453. printf("hissing very aggressively. \n") ;
  454. printf("Venom is dripping from its sharp fangs and seems ") ;
  455. printf("to be burning holes into\n") ;
  456. printf("the stone floor.\n\n") ;
  457. printf("I think it would be wise for us to leave....  Quickly!!\n") ;
  458.         mnstr_local->Status = F_killing ;
  459.         return ;
  460.     }
  461.     if (mnstr_local->Status == F_killing) {
  462.         /* The Hoop Snake kills the player */
  463. printf("\nThe hoop snake strikes and bites you right on the nose!") ;
  464. printf("\n\nYou begin to thrash around ") ;
  465. printf("like a Baygon sprayed cocky.  The nerve poison \n") ;
  466. printf("makes you jerk around onto your back with your arms and ") ;
  467. printf("legs flailing about\n") ;
  468. printf("in the air.  With time your spasmodic twitching reduces") ;
  469. printf(" in frequency.  You\n") ;
  470. printf("slowly grind down to a halt with the coming of death. \n") ;
  471.         ender(F_died) ;
  472.     }
  473.  
  474. }
  475. } /* end of the local monster switch group */
  476. }
  477.  
  478. chaser(mnstr_chase, loc_pnt) ;
  479. return ;
  480.  
  481. } /* --- end of the "monster" subroutine --- */
  482.  
  483. #if (PROTOTYPE)
  484. void chaser(MONSTER_STRUCT *mnstr, int loc_pnt[3])
  485. #else
  486. chaser(mnstr, loc_pnt)
  487. MONSTER_STRUCT *mnstr ;
  488. int loc_pnt[3] ;
  489. #endif
  490. /********************************************************************/
  491. /*                                                                  */
  492. /*               --- Monster Chasing Subroutine ---                 */
  493. /*                                                                  */
  494. /* Software by Gary A. Allen, Jr. 8 December 1992, Version: Mk 2.0 */
  495. /*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  496. /*                                                                  */
  497. /********************************************************************/
  498.  
  499. #if (PROTOTYPE)
  500. void ned_kills(void), ender(int) ;
  501. void bugs(int) ;
  502. #endif
  503.  
  504. switch(mnstr->Type) {
  505. /* Ned Kelly */
  506. case N_ned:
  507.     if (loc_pnt[0] == R_hideout_entr) {
  508.         if (Ned->Status == F_passive) {
  509. printf("\nNed Kelly is standing in front of you and is holding a ");
  510. printf("12 guage shotgun\n") ;
  511. printf("in a rather menacing manner.  This guy is really game!\n\n") ;
  512. printf("I suggest we leave.....   and quickly!!\n\n") ;
  513.             Ned->Status = F_aggressive ;
  514.             return ;
  515.         }
  516.         if (Ned->Status == F_aggressive) {
  517. printf("\nNed seems to be getting impatient with you.  He is now ");
  518. printf("expressing his\n") ;
  519. printf("displeasure with your continued presence by cocking both ");
  520. printf("of the hammers on\n") ;
  521. printf("his shotgun and pointing it at your head.  I really think ");
  522. printf("we should be\n") ;
  523. printf("making a hasty departure!!\n\n") ;
  524.             Ned->Status = F_killing ;
  525.             return ;
  526.         }
  527.         if (Ned->Status != F_killing) {
  528.             monster_flag = F_no_monster ;
  529.             Ned->Status = F_asleep ;
  530.             return ;
  531.         }
  532.         else ned_kills() ;
  533.     }
  534.     else {
  535.         monster_flag = F_no_monster ;
  536.         Ned->Status = F_asleep ;
  537.         return ;
  538.     }
  539.  
  540. /* Mutant wombat chases */
  541. case N_wombat:
  542.     if (loc_pnt[0] == R_lift_inside) {
  543. printf("\nYou run as fast as you can into the lift.  You've made it! ") ;
  544. printf(" You're in the\n") ;
  545. printf("lift! However as you turn around, you realize to your horror") ;
  546. printf(" that the\n") ;
  547. printf("wombat has also made it inside the lift, and the door ");
  548. printf("is closing!!\n\n") ;
  549. printf("                     Ah, Stuff of Nightmares!!!\n") ;
  550. printf("          ---Trapped in a Lift with a Mutant Wombat!!!---\n\n");
  551. printf("This is just too horrible.  Let it suffice... You died. \n");
  552.     ender(F_died) ;
  553.     }
  554.     if (loc_pnt[0] == loc_pnt[2]) {
  555. printf("The wombat is in that direction.  You can't go that way!\n");
  556.         loc_pnt[0] = loc_pnt[1] ;
  557.         return ;
  558.     }
  559.     if (!sw_wombat) {
  560. printf("\nAs you flee down the passage, you hear the ");
  561. printf("\"THUD, THUD, THUD\" of the wombat\n") ;
  562. printf("trudging down the passage.  The horrible thing is after") ;
  563. printf(" you!  Give up\n") ;
  564. printf("all hope!  The wombat is driven by nuclear energy and") ;
  565. printf(" will never stop.\n\n") ;
  566.     sw_wombat = TRUE ;
  567.     }
  568.     else { 
  569. printf("\nThe wombat is still chasing you and not tiring. \n") ;
  570.     }
  571.     monster_flag = F_monster_active ;
  572.     mnstr->Status = F_aggressive ;
  573.     --room[mnstr->Location][M_monster] ;
  574.     ++room[loc_pnt[0]][M_monster] ;
  575.     mnstr->Location = loc_pnt[0] ;
  576.     loc_pnt[2] = loc_pnt[1] ;
  577.     loc_pnt[1] = loc_pnt[0] ;
  578.     return ;
  579.  
  580. /* Hoop Snake chases */
  581. case N_hoop_snake:
  582.     if (loc_pnt[0] == R_lift_inside) {
  583. printf("\nYou seek refuge from the hoop snake by fleeing into the ") ;
  584. printf("lift.  Just as you\n") ;
  585. printf("enter the lift, its door begins to close.  Unfortunately the") ;
  586. printf(" hoop snake\n") ;
  587. printf("rolls in the instant before the door is fully closed.\n\n") ;
  588. printf("We will not describe the unpleasant events that occur behind");
  589. printf(" the closed door\n");
  590. printf("of the lift. However one can hear screams, curses, futile ");
  591. printf("banging on the\n");
  592. printf("lift door and loud snake hissing.  After a few minutes ");
  593. printf("there is again silence.\n");
  594. printf("The lift door opens and the hoop snake rolls out and away. ");
  595. printf("A peek inside the\n");
  596. printf("lift reveals your corpse which is in the early phases of ");
  597. printf("rigor mortis.\n") ;
  598.     ender(F_died) ;
  599.     }
  600.     if (loc_pnt[0] == loc_pnt[2]) {
  601.         if (mnstr->Status == F_killing) {
  602. printf("The hoop snake is in that direction.  ") ;
  603. printf("You can't go that way!\n");
  604.         loc_pnt[0] = loc_pnt[1] ;
  605.         return ;
  606.         }
  607.         else {
  608. printf("You have run back the way you came and passed the hoop ");
  609. printf("snake, which\n") ;
  610. printf("is still biting its tail and rolling like a hoop. The ") ;
  611. printf("vile creature\n") ;
  612. printf("hisses in frustration and does a U-turn to continue ") ;
  613. printf("the chase.\n\n") ;
  614.         }
  615.     }
  616.     else {
  617.         if (!sw_snaked) {
  618. printf("\nAs you flee down the passage, you hear the characteristic ") ;
  619. printf("sound of reptilian\n") ;
  620. printf("scales rubbing the stone floor.  You look over your shoulder") ;
  621. printf(" and see the\n") ;
  622. printf("hoop snake is rolling along right behind you! The dreaded") ;
  623. printf(" thing is chasing you!!\n\n") ;
  624.             sw_snaked = TRUE ;
  625.         }
  626.         else {
  627. printf("\nThe hoop snake is rolling along behind you, and still") ;
  628. printf(" in hot pursuit!\n\n") ;
  629.         }
  630.     }
  631.     monster_flag = F_monster_active ;
  632.     mnstr->Status = F_aggressive ;
  633.     --room[mnstr->Location][M_monster] ;
  634.     ++room[loc_pnt[0]][M_monster] ;
  635.     mnstr->Location = loc_pnt[0] ;
  636.     loc_pnt[2] = loc_pnt[1] ;
  637.     loc_pnt[1] = loc_pnt[0] ;
  638.     return ;
  639.  
  640. /* Deactive all other possible monsters */
  641. case N_drop_bear:
  642. case N_mullah:
  643. case N_guards:
  644.     monster_flag = F_no_monster ;
  645.     mnstr->Status = F_asleep ;
  646.     return ;
  647. } /* end of the chasing monster switch group */
  648.  
  649. /* This logic detects a potentially bad error. */
  650. /*         Normally this is dead code.         */
  651. printf("Run time error detected in \"chaser\" subroutine.\n") ;
  652. printf("\"mnstr->Type\" value was %d.\n",  mnstr->Type) ;
  653. bugs(Logic_error) ;
  654. return ;  /* this is just a dummy return for Lint */
  655.  
  656. } /* --- end of the "chaser" subroutine --- */
  657.  
  658. #if (PROTOTYPE)
  659. void ned_kills(void)
  660. #else
  661. ned_kills()
  662. #endif
  663. /********************************************************************/
  664. /*                                                                  */
  665. /*           --- Ned Killy Kills the Player Subroutine ---           */
  666. /*                                                                  */
  667. /*  Software by Gary A. Allen, Jr. 7 December 1992, Version: Mk 1.0 */
  668. /*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  669. /*                                                                  */
  670. /********************************************************************/
  671. {
  672.  
  673. #if (PROTOTYPE)
  674. void ender(int) ;
  675. #endif
  676.  
  677. printf("\nWith an air of professional detachment, Ned Kelly pulls ");
  678. printf("both triggers\n") ;
  679. printf("on his shotgun and blows your head clean off your ") ;
  680. printf("shoulders. \n\n") ;
  681.     ender(F_died) ;
  682. } /* --- end of the ned_kills" subroutine --- */
  683.  
  684. #if (PROTOTYPE)
  685. void mullah_kills(void)
  686. #else
  687. mullah_kills()
  688. #endif
  689. /********************************************************************/
  690. /*                                                                  */
  691. /*             --- Mullah Kills the Player Subroutine ---           */
  692. /*                                                                  */
  693. /*  Software by Gary A. Allen, Jr. 7 December 1992, Version: Mk 1.0 */
  694. /*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  695. /*                                                                  */
  696. /********************************************************************/
  697. {
  698.  
  699. #if (PROTOTYPE)
  700. void ender(int) ;
  701. #endif
  702.  
  703. printf("\nWith that pronouncement, the chief Mullah claps his hands\n");
  704. printf("twice.  Two Revolutionary Guards drag you outside where you\n");
  705. printf("are executed before a jeering mob of 30,000 people!\n") ;
  706.     ender(F_died) ;
  707. } /* --- end of the "mullah_kills" subroutine --- */
  708.  
  709. #if (PROTOTYPE)
  710. void see_letter(int *count_on, int *sw_letter)
  711. #else
  712. see_letter(count_on, sw_letter)
  713. int *count_on, *sw_letter ;
  714. #endif
  715. /********************************************************************/
  716. /*                                                                  */
  717. /*         --- Mullah see Gaddafi's Letter Subroutine ---           */
  718. /*                                                                  */
  719. /*  Software by Gary A. Allen, Jr. 7 December 1992, Version: Mk 1.0 */
  720. /*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  721. /*                                                                  */
  722. /********************************************************************/
  723. {
  724. printf("\nThe Mullah gives the letter a casual glance, then\n");
  725. printf("suddenly his face lights up and he claps his hands with\n") ;
  726. printf("glee.\n\n") ;
  727. printf("\"It's a letter from my old friend Muammar!\", he exclaims!\n");
  728. printf("\"This is an occasion for much jubulation.  As a token of\n");
  729. printf("my esteem take this ancient gong clapper made of gold and\n");
  730. printf("ivory.  It was recovered from the personal collection of\n") ;
  731. printf("the deposed Shah. It once belonged to the ancient Persian\n") ;
  732. printf("King Cyrus and is priceless!\"\n\n") ;
  733. printf("With this glad tiding the Mullah hands you the ancient\n") ;
  734. printf("clapper and then reaches down to pick up the letter from\n") ;
  735. printf("his old friend.\n") ;
  736.  
  737. Mullah->Status = F_passive ;
  738. Guards->Status = F_passive ;
  739. Letter->Location = B_destroyed ;
  740. --room[R_prayer][M_obj_cnt] ;
  741. Clapper->Location = B_have ;
  742. Detector->Location = R_guard ;
  743. ++room[R_guard][M_obj_cnt] ;
  744. carry_count++ ;
  745. carry_weight += Clapper->Weight ;
  746. *sw_letter = TRUE ;
  747. *count_on = 0 ;
  748.  
  749. } /* --- end of the "see_letter" subroutine --- */
  750.  
  751. #if (PROTOTYPE)
  752. void chief_mullah(int *count_on)
  753. #else
  754. chief_mullah(count_on)
  755. int *count_on ;
  756. #endif
  757. /********************************************************************/
  758. /*                                                                  */
  759. /*               --- Chief Mullah Subroutine ---                    */
  760. /*                                                                  */
  761. /*  Software by Gary A. Allen, Jr. 8 December 1992, Version: Mk 1.0 */
  762. /*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  763. /*                                                                  */
  764. /********************************************************************/
  765. {
  766. register int i ;
  767.  
  768. OBJECT_STRUCT *pnt ;
  769.  
  770. #if (PROTOTYPE)
  771. void hold_it(void) ;
  772. void mullah_kills(void) ;
  773. #endif
  774.  
  775. printf("\n") ;
  776. hold_it() ;
  777. Mullah->Status = F_aggressive ;
  778. Guards->Status = F_aggressive ;
  779.  
  780. printf("The chief Mullah (or whatever he is) who is sitting on the\n");
  781. printf("dias glares in your direction and begins expounding in a\n");
  782. printf("long monologue in Farsi. One of his Revolutionary Guards\n") ;
  783. printf("starts translating the Mullah's words into fairly good\n");
  784. printf("English (with an American accent!). Here is what he said:\n") ;
  785. printf("\n\"I can see by your slouch hat, singlet and short pants\n");
  786. printf("that you are a good-for-nothing satanic Australian. I am\n");
  787. printf("compelled to point out that your sort is most unwelcomed in\n");
  788.  
  789. /* see if the player has any valuables or the letter */
  790. pnt = object ;
  791. for (i = 0; i < Objcnt; i++) { 
  792.     if ((pnt->Location == B_have)&& 
  793.          ((V_letter == pnt->ID)||(pnt->Value > 0))) {
  794.  
  795. /* Player has something the Mullah wants, so he lives */
  796. printf("this holy precinct.  Unless you can provide some good\n");
  797. printf("reasons (preferably financial ones) to the contrary, I\n");
  798. printf("shall order you to be executed immediately for the\n");
  799. printf("amusement and edification of the local populace!\"\n") ;
  800.             *count_on = 0 ;
  801.             return ;    
  802.     }
  803.     pnt++ ;
  804. }
  805.  
  806. /* Player has no valuables and doesn't have the letter so he dies */
  807. printf("this holy precinct.  Since you have nothing of value, our\n");
  808. printf("usual practice would be to take you hostage and extract a\n");
  809. printf("ransom from your government.  However the Ozzie Dollar\n") ;
  810. printf("doesn't buy all that much anymore, so we'll just execute\n");
  811. printf("you and leave it at that.\"\n") ;
  812. mullah_kills() ;
  813.  
  814. } /* --- end of the "chief_mullah" subroutine --- */
  815.  
  816. #if (PROTOTYPE)
  817. int bribe_mullah(int *count_on)
  818. #else
  819. int bribe_mullah(count_on)
  820. int *count_on ;
  821. #endif
  822. /********************************************************************/
  823. /*                                                                  */
  824. /*               --- Chief Mullah Subroutine ---                    */
  825. /*                                                                  */
  826. /*  Software by Gary A. Allen, Jr. 3 January 1993 , Version: Mk 1.0 */
  827. /*           (c) Copyright 1993 by Gary A. Allen, Jr.               */
  828. /*                                                                  */
  829. /********************************************************************/
  830. {
  831. register int j ;
  832. int sw_bribe ;
  833. OBJECT_STRUCT *pnt ;
  834.  
  835. /* The Mullah takes any valuables dropped */
  836. sw_bribe = FALSE ;
  837. pnt = object ;
  838. for (j = 0; j < Objcnt; j++) { 
  839.     if ((pnt->Location == R_prayer) && (pnt->Value > 0)) {
  840.         pnt->Location = B_destroyed ;
  841.         --room[R_prayer][M_obj_cnt] ;
  842.         sw_bribe = TRUE ;
  843.     }
  844.     pnt++ ;
  845. }
  846. if (sw_bribe) {
  847. printf("\nOne of the guards picks up the treasure and hands it over to\n") ;
  848. printf("the chief Mullah who discretely pockets it within his robe.  The\n") ;
  849. printf("Mullah then looks expectantly towards you...  I think he wants\n") ;
  850. printf("more treasure.\n") ;
  851.     *count_on = 0 ;
  852.     return(TRUE) ;    
  853. }
  854. return(FALSE) ;
  855.  
  856. } /* --- end of the "bribe_mullah" function --- */
  857.  
  858.